var _App;
function _defineProperty(o, e, a) {
  return e in o ? Object.defineProperty(o, e, {
    value: a,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : o[e] = a, o;
}

App((_defineProperty(_App = {
  onLaunch: function () { },
  onShow: function () {
    console.log(getCurrentPages());
  },
  onHide: function () {
    console.log(getCurrentPages());
  },
  onError: function (o) {
    console.log(o);
  },
  util: require("we7/resource/js/util.js"),
  title: function (o) {
    if ("" == o) return !0;
    wx.showModal({
      title: "",
      content: o
    });
  },
  getUserInfo: function (e) {
    var a = this, o = this.globalData.userInfo;
    console.log(o), o ? "function" == typeof e && e(o) : wx.login({
      success: function (o) {
        wx.showLoading({
          title: "正在登录",
          mask: !0
        }), console.log(o.code), a.util.request({
          url: "entry/wxapp/Openid",
          cachetime: "0",
          data: {
            code: o.code
          },
          header: {
            "content-type": "application/json"
          },
          dataType: "json",
          success: function (o) {
            console.log("openid信息", o.data), getApp().getOpenId = o.data.openid, getApp().getSK = o.data.session_key,
              a.util.request({
                url: "entry/wxapp/login",
                cachetime: "0",
                data: {
                  openid: o.data.openid
                },
                header: {
                  "content-type": "application/json"
                },
                dataType: "json",
                success: function (o) {
                  console.log("用户信息", o), getApp().getuniacid = o.data.uniacid, wx.setStorageSync("users", o.data),
                    a.globalData.userInfo = o.data, "function" == typeof e && e(a.globalData.userInfo);
                }
              });
          },
          fail: function (o) { },
          complete: function (o) { }
        });
      }
    });
  }, 
  siteInfo: {
    name: "w2wer",
    uniacid: "6",
    acid: "6",
    multiid: "0",
    version: "1.0",
    siteroot: "http://wp.enfukeji.com/app/index.php",
    design_method: "3"
  },
  globalData: {
    userInfo: null
  }
}, "util", require("we7/resource/js/util.js"))
  , _App));